<%@ include file="/common/taglibs.jsp"%>
<fmt:message key="headerSelection" scope="request" var="hs" />
<head>
    <title><fmt:message key="catalogDetail.title"/></title>
    <meta name="heading" content="<fmt:message key='catalogDetail.heading'/>"/>
    <meta name="menu" content="MaterialMenu"/>

</head>

<div>
    <s:form id="catalogForm" action="saveCatalog" method="post" validate="true">
        <s:hidden name="catalog.id" value="%{catalog.id}"/>
        <s:textfield maxLength="60" key="catalog.name" required="true" cssClass="text medium" />
	<s:textfield maxLength="60" key="catalog.nameEs" required="true" cssClass="text medium" />
        <s:textfield maxLength="60" key="catalog.code" required="true" cssClass="text medium" />
        <s:checkbox key="catalog.actualCatalog" name="catalog.actual" />
        <s:textarea rows="10" cols="30" key="catalog.observation" required="true" cssClass="text medium" />
	<s:textarea rows="10" cols="30" key="catalog.observationEs" required="true" cssClass="text medium" />
        <s:optiontransferselect
            listKey="value"
            listValue="label"
            list="categoryListLeft"
            allowSelectAll="true"
            selectAllLabel="Select all"
            doubleListKey="value"
            doubleListValue="label"
            doubleName="categoryOptionsPicked"
            doubleList="categoryListRight"
            />
            
        <li class="buttonBar bottom">
            <s:submit cssClass="button" method="save" key="button.save" theme="simple"/>
            <c:if test="${not empty catalog.id}">
                <s:submit cssClass="button" method="delete" key="button.delete" onclick="return confirmDelete('catalog')" theme="simple"/>
            </c:if>
            <s:submit cssClass="button" method="cancel" key="button.cancel" theme="simple"/>
        </li>

    </s:form>
</div>
<script type="text/javascript">
    Form.focusFirstElement($("catalogForm"));
    document.getElementById('divFeatureCatalog').style.top = document.getElementById('catalogForm').offsetTop+"px";

</script>
